package com.yangchuang.openpicture.exception;


import com.yangchuang.openpicture.communication.ResultCode;
import lombok.Getter;

@Getter
public class BussinessException extends RuntimeException{
    private final int code;

    public BussinessException(int code,String message) {
        super(message);
        this.code = code;
    }

    public BussinessException(ResultCode resultCOde) {
        super(resultCOde.getMessage());
        this.code = resultCOde.getCode();
    }
}
